home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11865 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: gryphon.phoenix.net!usenet
  2. From: brucew@phoenix.net (Bruce Wedding)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Converting Strings to Upper Case
  5. Date: Wed, 27 Mar 1996 03:46:02 GMT
  6. Organization: BranPaul Systems
  7. Message-ID: <4jadro$a93@gryphon.phoenix.net>
  8. References: <4ifra6$52i@scipio.cyberstore.ca> <827087843snz@genesis.demon.co.uk> <31582859.3922@flash.net>
  9. NNTP-Posting-Host: dial151.phoenix.net
  10. X-Newsreader: Moe's Newsreader    
  11.  
  12. In comp.lang.c
  13. Quadra-Tech <quadra@flash.net> wrote:
  14.  
  15. >Try this function and see if it works for you.  Good luck.
  16.  
  17. He'll need it with this code :)
  18.  
  19. >char string[] = "This is a String";
  20.  
  21.  
  22. >void char fnReverse(char letter)
  23. Let's see, does it return a char or void or a void char, and why
  24. do you pass letter to it and never use it.  And why do you define
  25. ndx and never use it?  And where do you define n?  And why is a
  26. general purpose function written to access a global instead of
  27. passing the string to it?  And where is your prototype for
  28. tolower, toupper and isupper?
  29.  
  30. > int  ndx;
  31. >
  32. >  {
  33. >   for (n = 0; string[n] != 0; n++)
  34. >     {
  35. >      if (isupper(string[n]) == 0) 
  36. >        {
  37. >     string[n] = tolower(string[n]);
  38. >     continue;
  39. >        }
  40. >
  41. >      string[n] = toupper(string[n]);
  42. >  }  
  43.  
  44.  
  45.  
  46.